-- GENERATED SPELL FOR [Coilskar Waterkeeper] --


function spell0_19789(pUnit, Event) --@Frost Nova,Self--
pUnit:FullCastSpellOnTarget(38033,pUnit)
pUnit:RegisterEvent('Sorts_19789', 10000, 1)
end

function spell1_19789(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(9672,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19789', 7000, 1)
end

function Sorts_19789(pUnit, Event)
local choix_sorts_19789 = math.random(0, 1)
if choix_sorts_19789 == 0 then
pUnit:RegisterEvent('spell0_19789', 1, 1)
end
if choix_sorts_19789 == 1 then
pUnit:RegisterEvent('spell1_19789', 1, 1)
end
end

function mob19789_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_19789', math.random(1500, 3000), 1)
end

function mob19789_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19789_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19789_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(19789, 1, 'mob19789_Action')
RegisterUnitEvent(19789, 2, 'mob19789_Leave')
RegisterUnitEvent(19789, 3, 'mob19789_Kill')
RegisterUnitEvent(19789, 4, 'mob19789_Die')
